#include <stdio.h>

int main()
{
  int month;
  printf("请输入月份：");
  scanf("%d", &month);
  switch (month)
  {
  case 1:
  case 3:
  case 5:
  case 7:
  case 8:
  case 10:
  case 12:
    printf("%d月有31天\n", month);
    break;

  case 4:
  case 6:
  case 9:
  case 11:
    printf("%d月有30天\n", month);
    break;

  case 2:
    printf("%d月有28天或29天\n", month);
    break;
  default:
    printf("输入错误！\n");
  }
  printf("程序结束！");
  return 0;
}